import { lazy } from 'react'

const RouterList = [
    {
        path: '/home',
        component: lazy(() => import('../page/Home')),
        children: [
            {
                path: '/home/index',
                name: '首页',
                component: lazy(() => import('../page/HomeIndex/index'))
            },
            {
                path: '/home/new',
                name: '新品',
                component: lazy(() => import('../page/New/index')),
                children: [
                    {
                        path: '/home/new/selected',
                        name: '精选',
                        component: lazy(() => import('../page/Selected/index'))
                    },
                    {
                        path: '/home/new/trend',
                        name: '趋势',
                        component: lazy(() => import('../page/Trend/index'))
                    },
                    {
                        to: '/home/new/selected',
                        from: '/home/new'
                    }
                ]
            },
            {
                path: '/home/stroll',
                name: '逛',
                component: lazy(() => import('../page/Stroll/index'))
            },
            {
                path: '/home/shop',
                name: '购物车',
                component: lazy(() => import('../page/Shop/index'))
            },
            {
                path: '/home/my',
                name: '我的',
                component: lazy(() => import('../page/My/index'))
            },
            {
                to: '/home/index',
                from: '/home'
            }
        ]
    },
    {
        to: '/home',
        from: '/'
    }
]

export default RouterList